import request from '@/utils/request'
// import { fround } from 'core-js/fn/number'

// 查询
export function getInsectList(data) {
  return request({
    url: `/diseaseInsect/query?limit=${data.limit}&page=${data.page}&keyword=${data.keyword}&wikiCropTypeId=${data.wikiCropTypeId}`,
    method: 'get'
  })
}

// 新增
export function addInsectList(data) {
  return request({
    url: `/diseaseInsect/insert`,
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data
  })
}

// 删除
export function deleteInsectList(data) {
  return request({
    url: `/diseaseInsect/delete/${data.diseaseInsectId}`,
    method: 'delete'
  })
}

// 批量删除
export function deleteInsectLists(data) {
  return request({
    url: `/diseaseInsect/deletes?ids%5B%5D=${data.item}`,
    method: 'delete'
  }
  )
}

//更新
export function updateInsectList(data){
    return request({
        url:'/diseaseInsect/update',
        method:'put',
        headers: {
            'Content-Type': 'multipart/form-data'
          },
        data
    })
}

//id查询
export function getlistbyId(data){
    return request({
        url:`/diseaseInsect/queryById/${data.diseaseInsectId}`,
        method:'get',
    })
}
